/*--------------------------------------------------------------
 * File: demo48.c 编码类型：C语言  UTF-8
 * Author WRS (1352509846@qq.com)
 * 功能: 数组拷贝，将一个数组复制个另外一个数组
 * Version 0.1
 * Date 2022-08-10 
 * 
 * @copyright Copyright (c) 2022
 * 
----------------------------------------------------------------*/

#include <stdio.h>

int main(int argc, char const *argv[])
{
    int array1[10] = {1,2,3,4,5,6,7,8,9,0};
    int array2[10] = {0};

    printf("拷贝前---\n");
    printf("array1 = ");
    for(int i=0; i<10; i++)
    {
        printf("%d ",array1[i]);
    }
    printf("\narray2 = ");
    for(int i=0; i<10; i++)
    {
        printf("%d ",array2[i]);
    }
    printf("\n拷贝后---\n");

    for(int i=0; i<10; i++)
    {
        array2[i] = array1[i];
    }

    printf("array1 = ");
    for(int i=0; i<10; i++)
    {
        printf("%d ",array1[i]);
    }
    printf("\narray2 = ");
    for(int i=0; i<10; i++)
    {
        printf("%d ",array2[i]);
    }

    return 0;
}
